// 萌力表情包范围
export const mengliEmojiRange = [{
  type: 1,
  name: '萌力星球'
}, {
  type: 2,
  name: '其他'
}];

// 萌力表情包类型
export const mengliEmojiType = [{
  type: 1,
  name: '原创'
}, {
  type: 2,
  name: '商业'
}, {
  type: 3,
  name: '联名'
}];

// 萌力表情包效果
export const mengliEmojiEffect = [{
  type: 1,
  name: '动态'
}, {
  type: 2,
  name: '静态'
}];

// 订单管理的时间类型
export const orderTimetypes = [{
  type: 0,
  name: '下单日期'
}, {
  type: 1,
  name: '到账日期'
}];

export const paramsToJsonScema = (str) => {
  const arr = str.split('$');
  const ans = {};
  const keys = [];
  if (arr) {
    arr.forEach(i => {
      const dataArr = i.split(',');
      const key = dataArr[0].replace('\n', '');
      ans[`${key}`] = {};
      ans[`${key}`][`type`] = dataArr[1];
      const description = dataArr.slice(5).join(',');
      ans[`${key}`][`description`] = description;
      keys.push(key);
    });
  }
  return { ans, keys };
};
